package com.ansuenjob.jsonBuilder;

import java.util.ArrayList;
import java.util.List;

import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import com.ansuenjob.model.Letter;
import com.ansuenjob.vo.JobVO;


public class LetterFunctions {
	public static List<Letter> getLetters(JSONArray jsonArray) throws JSONException {
		LetterBuilder builder = new LetterBuilder();
		List<Letter> letters = new ArrayList<Letter>();
		for (int i = 0; i < jsonArray.length(); i++) {
			letters.add(builder.buildJson(jsonArray.getJSONObject(i)));
		}
		return letters;
	}
}
